package com.allwees.bs.c.module.sys.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.math.BigInteger;

/**
 * @author yangylsky
 * @since 2019-09-07
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "t_oauth_division")
public class DivisionEntity implements Serializable {
    @Id
    private Integer id;
    //上级id
    private Integer pid;
    // 编号
    @Column(length = 99)
    private String divisionCode;

    // 级别
    private Integer layer;

    /**
     * 默认中文名。或者本地名字
     */
    @Column(length = 99)
    private String name;

    /**
     * 曾用名
     */
    @Column(length = 128)
    private String oldName;
    // 英文名
    @Column(length = 128)
    private String cnName;
    // 可用标志,Y可用，或者其它代表“删除”
    @Column(length = 64)
    private String status;

    private BigInteger createTime;
    private BigInteger updateTime;
    @Column(length = 2)
    private String enableFlag;
}
